function selectAllChk(idname){
                //全选checkbox 用id区分 (把名字为idname的全选)
                var a = document.getElementsByTagName("input");
                for (var i=0; i<a.length; i++){
                   if (a[i].type == "checkbox" && a[i].name==idname ) a[i].checked =!a[i].checked;
                }
}
function ShowMsg(msg){
                alert(msg);
                return false;
}
function getFckeditorText(editor_name){
                //获取fckeditor内容
                var oEditor = FCKeditorAPI.GetInstance(editor_name) ;
                returnValue = oEditor.GetXHTML(true);
                return returnValue;
}

        function enter2tab()
        {
                        $("input[readonly!=readonly],select,textarea").addClass('enterIndex');
                        $(".enterIndex").keydown(function(event){
                                if(event.keyCode==13){
                                var i=$(".enterIndex").index($(this));
                                var n=$(".enterIndex").length;
                                        if( i < n-1){
                                        if($(this).attr('type')!='radio')
                                        $(".enterIndex").eq(i+1).trigger('focus');
                                        else{
                                                        var last_radio=$(".enterIndex").index($(".enterIndex[type=radio][name="+$(this).attr('name')+"]:last"));
                                                        $(".enterIndex").eq(last_radio+1).trigger('focus');
                                                }
                                        }
                                        return false;
                                }
                        });
                        $("input:text[readonly!=readonly],textarea,select").focus(function(){
                                $(this).select();
                                $(this).css('background-color','#FFFF99');
                         });
                         $("input:text[readonly!=readonly],textarea,select").blur(function(){
                                $(this).css('background-color','#FFFFFF');
                         });

        }
